// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   Google Cloud Natural Language API Version v1beta1
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://cloud.google.com/natural-language/'>Google Cloud Natural Language API</a>
 *      <tr><th>API Version<td>v1beta1
 *      <tr><th>API Rev<td>20170320 (809)
 *      <tr><th>API Docs
 *          <td><a href='https://cloud.google.com/natural-language/'>
 *              https://cloud.google.com/natural-language/</a>
 *      <tr><th>Discovery Name<td>language
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using Google Cloud Natural Language API can be found at
 * <a href='https://cloud.google.com/natural-language/'>https://cloud.google.com/natural-language/</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.CloudNaturalLanguage.v1beta1
{
    /// <summary>The CloudNaturalLanguage Service.</summary>
    public class CloudNaturalLanguageService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v1beta1";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public CloudNaturalLanguageService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public CloudNaturalLanguageService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            documents = new DocumentsResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "language"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://language.googleapis.com/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return ""; }
        }

        /// <summary>Available OAuth 2.0 scopes for use with the Google Cloud Natural Language API.</summary>
        public class Scope
        {
            /// <summary>View and manage your data across Google Cloud Platform services</summary>
            public static string CloudPlatform = "https://www.googleapis.com/auth/cloud-platform";

        }



        private readonly DocumentsResource documents;

        /// <summary>Gets the Documents resource.</summary>
        public virtual DocumentsResource Documents
        {
            get { return documents; }
        }
    }

    ///<summary>A base abstract class for CloudNaturalLanguage requests.</summary>
    public abstract class CloudNaturalLanguageBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new CloudNaturalLanguageBaseServiceRequest instance.</summary>
        protected CloudNaturalLanguageBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>V1 error format.</summary>
        [Google.Apis.Util.RequestParameterAttribute("$.xgafv", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<XgafvEnum> Xgafv { get; set; }

        /// <summary>V1 error format.</summary>
        public enum XgafvEnum
        {
            /// <summary>v1 error format</summary>
            [Google.Apis.Util.StringValueAttribute("1")]
            Value1,
            /// <summary>v2 error format</summary>
            [Google.Apis.Util.StringValueAttribute("2")]
            Value2,
        }

        /// <summary>OAuth access token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("access_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string AccessToken { get; set; }

        /// <summary>Data format for response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
            /// <summary>Media download with context-dependent Content-Type</summary>
            [Google.Apis.Util.StringValueAttribute("media")]
            Media,
            /// <summary>Responses with Content-Type of application/x-protobuf</summary>
            [Google.Apis.Util.StringValueAttribute("proto")]
            Proto,
        }

        /// <summary>OAuth bearer token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("bearer_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string BearerToken { get; set; }

        /// <summary>JSONP</summary>
        [Google.Apis.Util.RequestParameterAttribute("callback", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Callback { get; set; }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Pretty-print response.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("pp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> Pp { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>Legacy upload protocol for media (e.g. "media", "multipart").</summary>
        [Google.Apis.Util.RequestParameterAttribute("uploadType", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UploadType { get; set; }

        /// <summary>Upload protocol for media (e.g. "raw", "multipart").</summary>
        [Google.Apis.Util.RequestParameterAttribute("upload_protocol", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UploadProtocol { get; set; }

        /// <summary>Initializes CloudNaturalLanguage parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "$.xgafv", new Google.Apis.Discovery.Parameter
                {
                    Name = "$.xgafv",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "access_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "access_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "bearer_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "bearer_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "callback", new Google.Apis.Discovery.Parameter
                {
                    Name = "callback",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "pp", new Google.Apis.Discovery.Parameter
                {
                    Name = "pp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "uploadType", new Google.Apis.Discovery.Parameter
                {
                    Name = "uploadType",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "upload_protocol", new Google.Apis.Discovery.Parameter
                {
                    Name = "upload_protocol",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "documents" collection of methods.</summary>
    public class DocumentsResource
    {
        private const string Resource = "documents";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public DocumentsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Finds named entities (currently proper names and common nouns) in the text along with entity types,
        /// salience, mentions for each entity, and other properties.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual AnalyzeEntitiesRequest AnalyzeEntities(Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnalyzeEntitiesRequest body)
        {
            return new AnalyzeEntitiesRequest(service, body);
        }

        /// <summary>Finds named entities (currently proper names and common nouns) in the text along with entity types,
        /// salience, mentions for each entity, and other properties.</summary>
        public class AnalyzeEntitiesRequest : CloudNaturalLanguageBaseServiceRequest<Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnalyzeEntitiesResponse>
        {
            /// <summary>Constructs a new AnalyzeEntities request.</summary>
            public AnalyzeEntitiesRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnalyzeEntitiesRequest body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnalyzeEntitiesRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "analyzeEntities"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "v1beta1/documents:analyzeEntities"; }
            }

            /// <summary>Initializes AnalyzeEntities parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }

        /// <summary>Analyzes the sentiment of the provided text.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual AnalyzeSentimentRequest AnalyzeSentiment(Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnalyzeSentimentRequest body)
        {
            return new AnalyzeSentimentRequest(service, body);
        }

        /// <summary>Analyzes the sentiment of the provided text.</summary>
        public class AnalyzeSentimentRequest : CloudNaturalLanguageBaseServiceRequest<Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnalyzeSentimentResponse>
        {
            /// <summary>Constructs a new AnalyzeSentiment request.</summary>
            public AnalyzeSentimentRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnalyzeSentimentRequest body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnalyzeSentimentRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "analyzeSentiment"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "v1beta1/documents:analyzeSentiment"; }
            }

            /// <summary>Initializes AnalyzeSentiment parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }

        /// <summary>Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part
        /// of speech tags, dependency trees, and other properties.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual AnalyzeSyntaxRequest AnalyzeSyntax(Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnalyzeSyntaxRequest body)
        {
            return new AnalyzeSyntaxRequest(service, body);
        }

        /// <summary>Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part
        /// of speech tags, dependency trees, and other properties.</summary>
        public class AnalyzeSyntaxRequest : CloudNaturalLanguageBaseServiceRequest<Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnalyzeSyntaxResponse>
        {
            /// <summary>Constructs a new AnalyzeSyntax request.</summary>
            public AnalyzeSyntaxRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnalyzeSyntaxRequest body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnalyzeSyntaxRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "analyzeSyntax"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "v1beta1/documents:analyzeSyntax"; }
            }

            /// <summary>Initializes AnalyzeSyntax parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }

        /// <summary>A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and
        /// analyzeSyntax provide in one call.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual AnnotateTextRequest AnnotateText(Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnnotateTextRequest body)
        {
            return new AnnotateTextRequest(service, body);
        }

        /// <summary>A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and
        /// analyzeSyntax provide in one call.</summary>
        public class AnnotateTextRequest : CloudNaturalLanguageBaseServiceRequest<Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnnotateTextResponse>
        {
            /// <summary>Constructs a new AnnotateText request.</summary>
            public AnnotateTextRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnnotateTextRequest body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.CloudNaturalLanguage.v1beta1.Data.AnnotateTextRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "annotateText"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "v1beta1/documents:annotateText"; }
            }

            /// <summary>Initializes AnnotateText parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }
    }
}

namespace Google.Apis.CloudNaturalLanguage.v1beta1.Data
{    

    /// <summary>The entity analysis request message.</summary>
    public class AnalyzeEntitiesRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Input document.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("document")]
        public virtual Document Document { get; set; } 

        /// <summary>The encoding type used by the API to calculate offsets.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("encodingType")]
        public virtual string EncodingType { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The entity analysis response message.</summary>
    public class AnalyzeEntitiesResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The recognized entities in the input document.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("entities")]
        public virtual System.Collections.Generic.IList<Entity> Entities { get; set; } 

        /// <summary>The language of the text, which will be the same as the language specified in the request or, if
        /// not specified, the automatically-detected language. See Document.language field for more details.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("language")]
        public virtual string Language { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The sentiment analysis request message.</summary>
    public class AnalyzeSentimentRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Input document. Currently, `analyzeSentiment` only supports English text
        /// (Document.language="EN").</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("document")]
        public virtual Document Document { get; set; } 

        /// <summary>The encoding type used by the API to calculate sentence offsets for the sentence
        /// sentiment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("encodingType")]
        public virtual string EncodingType { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The sentiment analysis response message.</summary>
    public class AnalyzeSentimentResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The overall sentiment of the input document.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("documentSentiment")]
        public virtual Sentiment DocumentSentiment { get; set; } 

        /// <summary>The language of the text, which will be the same as the language specified in the request or, if
        /// not specified, the automatically-detected language.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("language")]
        public virtual string Language { get; set; } 

        /// <summary>The sentiment for all the sentences in the document.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sentences")]
        public virtual System.Collections.Generic.IList<Sentence> Sentences { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The syntax analysis request message.</summary>
    public class AnalyzeSyntaxRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Input document.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("document")]
        public virtual Document Document { get; set; } 

        /// <summary>The encoding type used by the API to calculate offsets.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("encodingType")]
        public virtual string EncodingType { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The syntax analysis response message.</summary>
    public class AnalyzeSyntaxResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The language of the text, which will be the same as the language specified in the request or, if
        /// not specified, the automatically-detected language. See Document.language field for more details.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("language")]
        public virtual string Language { get; set; } 

        /// <summary>Sentences in the input document.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sentences")]
        public virtual System.Collections.Generic.IList<Sentence> Sentences { get; set; } 

        /// <summary>Tokens, along with their syntactic information, in the input document.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tokens")]
        public virtual System.Collections.Generic.IList<Token> Tokens { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The request message for the text annotation API, which can perform multiple analysis types (sentiment,
    /// entities, and syntax) in one call.</summary>
    public class AnnotateTextRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Input document.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("document")]
        public virtual Document Document { get; set; } 

        /// <summary>The encoding type used by the API to calculate offsets.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("encodingType")]
        public virtual string EncodingType { get; set; } 

        /// <summary>The enabled features.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("features")]
        public virtual Features Features { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The text annotations response message.</summary>
    public class AnnotateTextResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The overall sentiment for the document. Populated if the user enables
        /// AnnotateTextRequest.Features.extract_document_sentiment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("documentSentiment")]
        public virtual Sentiment DocumentSentiment { get; set; } 

        /// <summary>Entities, along with their semantic information, in the input document. Populated if the user
        /// enables AnnotateTextRequest.Features.extract_entities.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("entities")]
        public virtual System.Collections.Generic.IList<Entity> Entities { get; set; } 

        /// <summary>The language of the text, which will be the same as the language specified in the request or, if
        /// not specified, the automatically-detected language. See Document.language field for more details.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("language")]
        public virtual string Language { get; set; } 

        /// <summary>Sentences in the input document. Populated if the user enables
        /// AnnotateTextRequest.Features.extract_syntax.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sentences")]
        public virtual System.Collections.Generic.IList<Sentence> Sentences { get; set; } 

        /// <summary>Tokens, along with their syntactic information, in the input document. Populated if the user
        /// enables AnnotateTextRequest.Features.extract_syntax.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tokens")]
        public virtual System.Collections.Generic.IList<Token> Tokens { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents dependency parse tree information for a token.</summary>
    public class DependencyEdge : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Represents the head of this token in the dependency tree. This is the index of the token which has
        /// an arc going to this token. The index is the position of the token in the array of tokens returned by the
        /// API method. If this token is a root token, then the `head_token_index` is its own index.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("headTokenIndex")]
        public virtual System.Nullable<int> HeadTokenIndex { get; set; } 

        /// <summary>The parse label for the token.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("label")]
        public virtual string Label { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>################################################################ #
    ///
    /// Represents the input to API methods.</summary>
    public class Document : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The content of the input in string format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("content")]
        public virtual string Content { get; set; } 

        /// <summary>The Google Cloud Storage URI where the file content is located. This URI must be of the form:
        /// gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris.
        /// NOTE: Cloud Storage object versioning is not supported.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("gcsContentUri")]
        public virtual string GcsContentUri { get; set; } 

        /// <summary>The language of the document (if not specified, the language is automatically detected). Both ISO
        /// and BCP-47 language codes are accepted. **Current Language Restrictions:**
        ///
        /// * Only English, Spanish, and Japanese textual content are supported. If the language (either specified by
        /// the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error
        /// is returned.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("language")]
        public virtual string Language { get; set; } 

        /// <summary>Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT`
        /// error.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a phrase in the text that is a known entity, such as a person, an organization, or location.
    /// The API associates information, such as salience and mentions, with entities.</summary>
    public class Entity : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The mentions of this entity in the input document. The API currently supports proper noun
        /// mentions.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mentions")]
        public virtual System.Collections.Generic.IList<EntityMention> Mentions { get; set; } 

        /// <summary>Metadata associated with the entity.
        ///
        /// Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if available. The associated keys are
        /// "wikipedia_url" and "mid", respectively.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("metadata")]
        public virtual System.Collections.Generic.IDictionary<string,string> Metadata { get; set; } 

        /// <summary>The representative name for the entity.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The salience score associated with the entity in the [0, 1.0] range.
        ///
        /// The salience score for an entity provides information about the importance or centrality of that entity to
        /// the entire document text. Scores closer to 0 are less salient, while scores closer to 1.0 are highly
        /// salient.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("salience")]
        public virtual System.Nullable<float> Salience { get; set; } 

        /// <summary>The entity type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a mention for an entity in the text. Currently, proper noun mentions are
    /// supported.</summary>
    public class EntityMention : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The mention text.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("text")]
        public virtual TextSpan Text { get; set; } 

        /// <summary>The type of the entity mention.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>All available features for sentiment, syntax, and semantic analysis. Setting each one to true will
    /// enable that specific analysis for the input.</summary>
    public class Features : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Extract document-level sentiment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("extractDocumentSentiment")]
        public virtual System.Nullable<bool> ExtractDocumentSentiment { get; set; } 

        /// <summary>Extract entities.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("extractEntities")]
        public virtual System.Nullable<bool> ExtractEntities { get; set; } 

        /// <summary>Extract syntax information.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("extractSyntax")]
        public virtual System.Nullable<bool> ExtractSyntax { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents part of speech information for a token.</summary>
    public class PartOfSpeech : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The grammatical aspect.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("aspect")]
        public virtual string Aspect { get; set; } 

        /// <summary>The grammatical case.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("case")]
        public virtual string Case__ { get; set; } 

        /// <summary>The grammatical form.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("form")]
        public virtual string Form { get; set; } 

        /// <summary>The grammatical gender.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("gender")]
        public virtual string Gender { get; set; } 

        /// <summary>The grammatical mood.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mood")]
        public virtual string Mood { get; set; } 

        /// <summary>The grammatical number.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("number")]
        public virtual string Number { get; set; } 

        /// <summary>The grammatical person.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("person")]
        public virtual string Person { get; set; } 

        /// <summary>The grammatical properness.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("proper")]
        public virtual string Proper { get; set; } 

        /// <summary>The grammatical reciprocity.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reciprocity")]
        public virtual string Reciprocity { get; set; } 

        /// <summary>The part of speech tag.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tag")]
        public virtual string Tag { get; set; } 

        /// <summary>The grammatical tense.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tense")]
        public virtual string Tense { get; set; } 

        /// <summary>The grammatical voice.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("voice")]
        public virtual string Voice { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a sentence in the input document.</summary>
    public class Sentence : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>For calls to AnalyzeSentiment or if AnnotateTextRequest.Features.extract_document_sentiment is set
        /// to true, this field will contain the sentiment for the sentence.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sentiment")]
        public virtual Sentiment Sentiment { get; set; } 

        /// <summary>The sentence text.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("text")]
        public virtual TextSpan Text { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents the feeling associated with the entire text or entities in the text.</summary>
    public class Sentiment : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment
        /// regardless of score (positive or negative).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("magnitude")]
        public virtual System.Nullable<float> Magnitude { get; set; } 

        /// <summary>DEPRECATED FIELD - This field is being deprecated in favor of score. Please refer to our
        /// documentation at https://cloud.google.com/natural-language/docs for more information.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("polarity")]
        public virtual System.Nullable<float> Polarity { get; set; } 

        /// <summary>Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("score")]
        public virtual System.Nullable<float> Score { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The `Status` type defines a logical error model that is suitable for different programming
    /// environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model
    /// is designed to be:
    ///
    /// - Simple to use and understand for most users - Flexible enough to meet unexpected needs
    ///
    /// # Overview
    ///
    /// The `Status` message contains three pieces of data: error code, error message, and error details. The error code
    /// should be an enum value of google.rpc.Code, but it may accept additional error codes if needed.  The error
    /// message should be a developer-facing English message that helps developers *understand* and *resolve* the error.
    /// If a localized user-facing error message is needed, put the localized message in the error details or localize
    /// it in the client. The optional error details may contain arbitrary information about the error. There is a
    /// predefined set of error detail types in the package `google.rpc` which can be used for common error conditions.
    ///
    /// # Language mapping
    ///
    /// The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire
    /// format. When the `Status` message is exposed in different client libraries and different wire protocols, it can
    /// be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped
    /// to some error codes in C.
    ///
    /// # Other uses
    ///
    /// The error model and the `Status` message can be used in a variety of environments, either with or without APIs,
    /// to provide a consistent developer experience across different environments.
    ///
    /// Example uses of this error model include:
    ///
    /// - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the
    /// normal response to indicate the partial errors.
    ///
    /// - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error
    /// reporting purpose.
    ///
    /// - Batch operations. If a client uses batch request and batch response, the `Status` message should be used
    /// directly inside batch response, one for each error sub-response.
    ///
    /// - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of
    /// those operations should be represented directly using the `Status` message.
    ///
    /// - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any
    /// stripping needed for security/privacy reasons.</summary>
    public class Status : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The status code, which should be an enum value of google.rpc.Code.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("code")]
        public virtual System.Nullable<int> Code { get; set; } 

        /// <summary>A list of messages that carry the error details.  There will be a common set of message types for
        /// APIs to use.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("details")]
        public virtual System.Collections.Generic.IList<System.Collections.Generic.IDictionary<string,object>> Details { get; set; } 

        /// <summary>A developer-facing error message, which should be in English. Any user-facing error message should
        /// be localized and sent in the google.rpc.Status.details field, or localized by the client.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("message")]
        public virtual string Message { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents an output piece of text.</summary>
    public class TextSpan : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The API calculates the beginning offset of the content in the original document according to the
        /// EncodingType specified in the API request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("beginOffset")]
        public virtual System.Nullable<int> BeginOffset { get; set; } 

        /// <summary>The content of the output text.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("content")]
        public virtual string Content { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents the smallest syntactic building block of the text.</summary>
    public class Token : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Dependency tree parse for this token.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("dependencyEdge")]
        public virtual DependencyEdge DependencyEdge { get; set; } 

        /// <summary>[Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lemma")]
        public virtual string Lemma { get; set; } 

        /// <summary>Parts of speech tag for this token.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("partOfSpeech")]
        public virtual PartOfSpeech PartOfSpeech { get; set; } 

        /// <summary>The token text.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("text")]
        public virtual TextSpan Text { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }
}
